import { pubRequire } from '@utils/public'
const baseUrl = '/integrals'
// 积分管理列表
export function getIntegralsList(params, callBack, errBack) {
  return pubRequire('get', `${baseUrl}`, params, callBack, errBack)
}
// 修改积分
export function setIntegrals(params, callBack, errBack) {
  return pubRequire('put', `${baseUrl}`, params, callBack, errBack)
}
// 批量修改积分
export function importSetUrl(params, callBack, errBack) {
  return `${baseUrl}/batch`
}
// 积分详情列表
export function getDetailList(params, callBack, errBack) {
  return pubRequire('get', `${baseUrl}/details`, params, callBack, errBack)
}
// 下载批量修改积分模板
export function downSetUrl(params, callBack, errBack) {
  return `${baseUrl}/download-change-integral`
}
// 下载批量冻结积分模板
export function downFreezeUrl(params, callBack, errBack) {
  return `${baseUrl}/download-freeze-integral`
}
// 冻结积分
export function freeze(params, callBack, errBack) {
  return pubRequire('put', `${baseUrl}/freeze`, params, callBack, errBack)
}
// 批量冻结积分
export function importFreezeUrl(params, callBack, errBack) {
  return `${baseUrl}/freeze/batch`
}
// 解冻积分
export function unfreeze(params, callBack, errBack) {
  return pubRequire('put', `${baseUrl}/unfreeze`, params, callBack, errBack)
}
// 批量解冻积分
export function unfreezeBatch(params, callBack, errBack) {
  return pubRequire(
    'put',
    `${baseUrl}/unfreeze/batch`,
    params,
    callBack,
    errBack
  )
}
// 解除冻结记录列表
export function unfreezeRecord(params, callBack, errBack) {
  return pubRequire(
    'get',
    `${baseUrl}/freeze/records`,
    params,
    callBack,
    errBack
  )
}
// 用户积分修改记录列表
export function changesRecord(params, callBack, errBack) {
  return pubRequire(
    'get',
    `${baseUrl}/changes/records`,
    params,
    callBack,
    errBack
  )
}
